package org.cainiao.io.bio;

import java.io.*;
import java.nio.charset.StandardCharsets;
import java.util.zip.ZipInputStream;

/**
 * <br />
 * <p>
 * Author: Cai Niao(wdhlzd@163.com)<br />
 */
public class FilterInputStreamTest {

    public static void main(String[] args) {
        FilterInputStream filterInputStream = null;
        FilterOutputStream filterOutputStream = null;

        String fileName = "input.txt";

        try (BufferedInputStream bis = new BufferedInputStream(new FileInputStream(fileName));
             ZipInputStream zis = new ZipInputStream(bis)) {

            int content;
            long skip = bis.skip(2);
            while ((content = bis.read()) != -1) {
                System.out.print((char) content);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }

        try (InputStreamReader isr = new InputStreamReader(new FileInputStream(fileName), StandardCharsets.UTF_8)) {
            BufferedReader bufferedReader = new BufferedReader(isr);
        } catch (IOException e) {
            e.printStackTrace();
        }

        OutputStreamWriter outputStreamWriter = null;
    }
}
